NULL
and Undefined
in JavaScriptBoth null and undefined represent the absence of a value in JavaScript, but they are different in purpose and use.
Null
Example:
let value = null;
console.log(value);
Output: null
Undefined
Example:
let value;
console.log(value);
Output: undefined